Skip to content

🤖 feat: /btw side-question command + placeholder tip carousel#3293

Open
ammar-agent wants to merge 1 commit into
mainfrom
side-questions-2hr3
Open

🤖 feat: /btw side-question command + placeholder tip carousel#3293
ammar-agent wants to merge 1 commit into
mainfrom
side-questions-2hr3

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

@ammar-agent ammar-agent commented May 16, 2026

Summary

Adds the /btw slash command — a forked, single-turn, read-only side-question over the current conversation. Tools are denied on both the prompt and schema sides; the question and answer are persisted to chat history with distinct metadata and stream through the existing TypewriterMarkdown path so the side branch reads as one offset Q/A cycle in the transcript. Also adds a placeholder tip carousel that surfaces /btw (and other slash-command tricks) on a wall-clock rotation, making the new command passively discoverable without flashing across workspace switches.

Background

/btw is modeled on Claude Code 2.1.73's command of the same name: a quick "by the way, what was that file you mentioned?" question that runs against the current transcript without invoking tools and without re-anchoring the main agent loop. The persistence/UX iterated through three rounds (overlay → inline pair with dismiss button → single Q/A block with main-chat suspension) based on review feedback before settling on the current shape.

Implementation

Backend (src/node/services/sideQuestionService.ts)

  • Builds a side-question prompt from the workspace's transcript tail with a <system-reminder> that explicitly tells the model tools are unavailable; calls streamText with no tools argument so the no-tools contract is enforced on both prompt and schema sides.
  • Persists a placeholder assistant row first (so historyService allocates a real historySequence), emits it as a message chat event so the frontend aggregator sees the side-question-answer muxMetadata before stream-start, then drives stream-start/stream-delta/stream-end through session.emitChatEvent. The frontend's StreamingMessageAggregator handles these identically to a real agent stream — TypewriterMarkdown, smooth-text animation, and replay all just work.
  • Final updateHistory fills the placeholder with the streamed text; prior /btw exchanges are filtered out of each new side question's transcript so the model never grounds on its own earlier (possibly wrong) answers.
  • Tries up to three candidate models (current chat model first, then the small-model fallback list) so a single misconfigured candidate can't disable the feature.

Frontend: Q/A block + suspension

  • /btw user question renders as a bare block (no bubble, no right-alignment, no per-row meta) with a compact "Side question" header. The assistant answer tucks flush beneath it (mt-0) and both rows share the same continuous left accent stripe, so the pair reads as one offset side branch rather than two adjacent message rows.
  • WorkspaceStore.processStreamEvent consults aggregator.isSideQuestionStreaming() and buffers any chat event that targets a different message while a /btw answer is in flight. On the side-question's terminal event the buffer drains in arrival order, so main-agent text picks up after the aside instead of streaming concurrently underneath it. This is what fixes the layout flashes from the previous iteration.
  • handleStreamStart carries forward existing muxMetadata when constructing the fresh streaming envelope, so the side-question-answer marker survives the stream-start → stream-end window in both the live and replay paths.
  • Side-answer rows show only Copy in their action set (Start Here / Fork / Share / Show Text don't make sense for an off-main-thread message). The user-flagged dismiss button + workspace.dismissSideQuestion RPC + tests are removed — hard-delete UX wasn't worth the complexity now that the suspension layer keeps the pair visually contained.

Placeholder tip carousel

  • Rotates on a wall-clock 20-minute bucket (floor(Date.now() / 20min) % tips.length). Same bucket → same tip everywhere, so switching workspaces inside the same bucket never reshuffles the placeholder.
  • 11 tips, lead with /btw <question>. Mobile keeps the plain "Type a message..." placeholder.
  • Time-bucket model means we don't need a workspace subscription, so the per-workspace useWorkspaceUserMessageCount hook from the previous iteration was removed.

Validation

New tests cover the load-bearing behavioral contracts:

  • Side-question detection (StreamingMessageAggregator.sideQuestion.test.ts): isSideQuestionAnswerMessage discriminates by stored muxMetadata, isSideQuestionStreaming flips while a side stream is active, and the marker is preserved across handleStreamStart (regression coverage for the muxMetadata carry-forward).
  • Suspension layer (WorkspaceStore.test.ts → "/btw side-question suspension"): main-agent stream-delta events that arrive while a /btw answer is streaming are buffered (main text stays put), the side-answer's own deltas bypass suspension, and the buffer drains on side stream-end so the main message picks up where it left off.
  • Side-question service (sideQuestionService.test.ts): the placeholder envelope is emitted before stream-start with the correct side-question-answer muxMetadata, the full event sequence is messagemessage (placeholder) → stream-start → N × stream-deltastream-end, no tools are passed to streamText, prior side-question turns are filtered from the transcript, and empty answers short-circuit cleanly.
  • Placeholder tips (placeholderTips.test.ts): rewritten to test only behavior — same tip throughout a bucket, advances on bucket boundary, wraps past the end, and defensive fallback for non-finite inputs. The tautological "leads with /btw", "has between 1 and 11 tips", and "every tip references a slash command" tests called out in review were removed.

make typecheck, make lint, and make static-check all pass locally.

Risks

Concentrated in two places:

  1. Suspension layer touches the hot chat path. WorkspaceStore.processStreamEvent now consults aggregator.isSideQuestionStreaming() on every event before dispatching. The check is O(active streams) (almost always 1) and bypasses entirely when no /btw is running. Worst-case failure mode would be main-agent events getting stuck in the buffer if a /btw terminal event never fires; the buffer is cleared on workspace removal, but a long-lived "stuck" side stream would block the main agent. In practice the side-question service always emits a terminal event (the try/catch around streamText falls through to an empty stream-end).
  2. Bypasses the standard streamMessage pipeline. /btw emits stream events through session.emitChatEvent directly, so the workspace's streaming flag, idle-compaction recency, and post-compaction attachments all skip /btw. This is intentional product behavior, but worth a careful eye on StreamingMessageAggregator interactions if anything feels off.

Discoverability (future)

The tip carousel is tier-1. Right-click → "Ask /btw about this", a selection action chip, an onboarding slide, and a "did you mean /btw?" heuristic can land independently.


Generated with mux • Model: anthropic:claude-opus-4-7 • Thinking: high • Cost: $30.95

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 430261a29b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts Outdated
ammar-agent added a commit that referenced this pull request May 16, 2026
… carousel

Address review feedback on PR #3293:

- Render /btw as a single visually-distinct Q/A block: continuous left
  stripe joins the user question (compact, no bubble, 'Side question'
  header) and the assistant answer (mt-0 to tuck flush). Reads as one
  side-branch rather than two adjacent decorations.

- Suspend main-agent chat events while a /btw answer streams. While
  isSideQuestionStreaming() is true, events targeting other messages
  buffer in sideQuestionEventBuffer and replay on side stream-end. The
  main agent visually picks up *after* the aside instead of having
  concurrent tokens shove the side branch around (root cause of the
  layout flashes).

- Side-question pipeline now emits the placeholder MuxMessage envelope
  before stream-start so the side-question-answer marker reaches the
  frontend aggregator first. handleStreamStart carries the marker
  forward across its fresh-envelope construction so both the badge and
  the suspension layer see it for the full stream.

- Remove dismiss button + workspace.dismissSideQuestion RPC + tests.
  Hard-delete UX wasn't worth the complexity; users can leave the pair
  in place since the suspension layer keeps them visually contained.

- Tip carousel switches to a wall-clock 20-minute bucket so switching
  workspaces inside the same bucket never reshuffles the visible tip.
  Drop the now-unused useWorkspaceUserMessageCount hook and the
  tautological tests (lead-with, length cap, format regex) the reviewer
  flagged.

---

_Generated with `mux` • Model: `anthropic:claude-opus-4-7` • Thinking: `high` • Cost: \0.95_

<!-- mux-attribution: model=anthropic:claude-opus-4-7 thinking=high costs=30.95 -->
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Substantial follow-up: the /btw UX moved from "inline pair with dismiss" to a single visually-distinct Q/A block, and the main chat now suspends while a side question streams so concurrent main-agent tokens can't shove the side branch around (root cause of the prior layout flashes). The tip carousel is also rebucketed onto a wall-clock 20-min rotation so switching workspaces inside the same bucket no longer reshuffles the visible tip. PR body refreshed accordingly.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bbec371282

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
Comment thread src/node/services/sideQuestionService.ts Outdated
Comment thread src/browser/utils/slashCommands/registry.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8e87b45f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 124a72a496

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/workspaceService.ts
Comment thread src/node/services/sideQuestionService.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the latest P2 findings:

  • /btw model candidates now prefer the live parent stream model before persisted settings.
  • side-answer history update failures still emit the live stream-end, then return an error so the caller can report the persistence failure.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • bun test src/node/services/workspaceService.test.ts --test-name-pattern "getSideQuestionModelCandidates"
  • bun test src/node/services/aiService.test.ts src/browser/utils/messages/StreamingMessageAggregator.sideQuestion.test.ts src/browser/stores/WorkspaceStore.test.ts src/browser/components/ChatPane/sideQuestionScrollHold.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55e4a0b9ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the latest P2: side-question answer streams still render through StreamingMessageAggregator, but they no longer count as interruptible/busy streams for WorkspaceStore or sidebar working-state derivation.

Validation:

  • bun test src/browser/stores/WorkspaceStore.test.ts --test-name-pattern "/btw side-question tail flow"
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec56bacd94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/stores/WorkspaceStore.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the buffered replay issue: side-question stream starts are now ignored (not reset) in the pending active-stream fallback, so an in-flight main stream remains interruptible/working during hydration even if /btw starts afterward.

Validation:

  • bun test src/browser/stores/WorkspaceStore.test.ts --test-name-pattern "/btw side-question tail flow"
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 021fc904d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the context reset issue: /btw transcript construction now filters prior side-question rows and then applies the same latest context-boundary slicing used by normal provider requests, so soft-cleared content is not sent to the side-question model.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b1c975e80

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the transcript cap issue: /btw now reads the active history window, filters prior side-question rows and context-boundary slices, then applies the 200-message cap to the remaining main-context rows so previous /btw exchanges cannot crowd out recent main chat.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a96df87a95

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the live stream context issue: /btw now passes the synchronous AIService.getStreamInfo() snapshot into transcript construction and upserts those live main-agent parts over any throttled partial, so the side-question prompt includes text already visible in the UI.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16c30edd11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the live stream snapshot race: /btw now shallow-clones the live main-agent parts synchronously with getStreamInfo() before any awaited history I/O, and uses that frozen snapshot for both interruption metadata and transcript construction.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8ecc4611b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/workspaceService.ts Outdated
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the pre-candidate race: WorkspaceService.askSideQuestion() now snapshots and clones the live stream synchronously before awaiting model candidates, passes that snapshot into sideQuestionService, and reuses its model for candidate ordering.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • bun test src/node/services/workspaceService.test.ts --test-name-pattern "getSideQuestionModelCandidates"
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ba9f11fa2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the live partial duplication issue: when a live main stream snapshot is merged into the /btw transcript, older partial/history copies with the same id/historySequence are removed so the model sees one current version of the interrupted assistant turn.

Validation:

  • bun test src/node/services/sideQuestionService.test.ts
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aece1b3b19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
Comment thread src/browser/utils/chatCommands.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the latest findings and the reported bottom-sticking behavior:

  • /btw side branches now split into the interrupted main stream as soon as the side answer exists, so they no longer stay pinned at the bottom for the stream duration.
  • Side-question user rows no longer reset main-agent lifecycle/status.
  • Fire-and-forget /btw failures are ignored when their originating command/workspace is stale.

Validation:

  • bun test src/browser/utils/messages/StreamingMessageAggregator.sideQuestion.test.ts src/browser/stores/WorkspaceStore.test.ts --test-name-pattern "/btw side-question|lifecycle|interrupt state"
  • bun test src/browser/utils/chatCommands.test.ts --test-name-pattern "side-question"
  • make typecheck
  • make static-check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bede969e17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/stores/WorkspaceStore.ts
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Updated /btw scroll handling after the streaming-order fix: side questions now anchor at the interruption point immediately and release bottom-lock once main output appears below the side branch, so the user can read the aside before opting back into the live tail.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b4bf1881b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/utils/messages/StreamingMessageAggregator.ts
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from 95eed46 to b25c489 Compare May 16, 2026 21:45
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto latest main and force-pushed the side-question scroll/model/composer fixes after local validation passed.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b25c48949f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts Outdated
Comment thread src/browser/features/Messages/UserMessage.tsx
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from b25c489 to 850448e Compare May 16, 2026 21:53
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Fixed the post-rebase command gating conflict, re-ran local static-check, and force-pushed the corrected branch.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 850448e956

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from 850448e to ac3b820 Compare May 16, 2026 22:00
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the new fallback-model and side-question edit findings, with focused regression tests, then re-ran local targeted tests and make static-check.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac3b820c9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/utils/messages/StreamingMessageAggregator.ts Outdated
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from ac3b820 to deb0f34 Compare May 16, 2026 22:06
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Preserved side-question answer metadata on stream-end replay, added coverage for the terminal metadata, and re-ran focused tests plus make static-check.

@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from deb0f34 to a93d3fb Compare May 16, 2026 22:11
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Updated active-stream selection to ignore /btw side-answer streams for interrupt/live usage/stats callers, added regression coverage for side-answer-first ordering, and re-ran focused tests plus make static-check.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a93d3fbe3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/stores/WorkspaceStore.ts Outdated
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from a93d3fb to e8cfc02 Compare May 16, 2026 22:19
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Updated caught-up buffered stream classification to use the historical-message-aware side-answer detector, re-ran workspace /btw tests, focused side-question regressions, and make static-check.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ammar-agent added a commit that referenced this pull request May 17, 2026
… carousel

Address review feedback on PR #3293:

- Render /btw as a single visually-distinct Q/A block: continuous left
  stripe joins the user question (compact, no bubble, 'Side question'
  header) and the assistant answer (mt-0 to tuck flush). Reads as one
  side-branch rather than two adjacent decorations.

- Suspend main-agent chat events while a /btw answer streams. While
  isSideQuestionStreaming() is true, events targeting other messages
  buffer in sideQuestionEventBuffer and replay on side stream-end. The
  main agent visually picks up *after* the aside instead of having
  concurrent tokens shove the side branch around (root cause of the
  layout flashes).

- Side-question pipeline now emits the placeholder MuxMessage envelope
  before stream-start so the side-question-answer marker reaches the
  frontend aggregator first. handleStreamStart carries the marker
  forward across its fresh-envelope construction so both the badge and
  the suspension layer see it for the full stream.

- Remove dismiss button + workspace.dismissSideQuestion RPC + tests.
  Hard-delete UX wasn't worth the complexity; users can leave the pair
  in place since the suspension layer keeps them visually contained.

- Tip carousel switches to a wall-clock 20-minute bucket so switching
  workspaces inside the same bucket never reshuffles the visible tip.
  Drop the now-unused useWorkspaceUserMessageCount hook and the
  tautological tests (lead-with, length cap, format regex) the reviewer
  flagged.

---

_Generated with `mux` • Model: `anthropic:claude-opus-4-7` • Thinking: `high` • Cost: \0.95_

<!-- mux-attribution: model=anthropic:claude-opus-4-7 thinking=high costs=30.95 -->
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from e8cfc02 to 064d6b0 Compare May 17, 2026 14:56
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased on latest main and force-pushed after make static-check passed locally.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 064d6b08f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/sideQuestionService.ts
Comment thread src/browser/utils/messages/StreamingMessageAggregator.ts
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from 064d6b0 to b339b3a Compare May 17, 2026 15:03
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the side-answer stream-start pending-startup regression and the zero-offset non-text split regression with focused tests; make static-check passed locally.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b339b3ac54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/utils/messages/StreamingMessageAggregator.ts
Comment thread src/node/services/sideQuestionService.ts
@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from b339b3a to 599e39b Compare May 17, 2026 15:10
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the side-answer terminal handling: main completions are final even while /btw streams overlap, and side-answer stream-end no longer clears pending main startup. Added focused regressions and make static-check passed locally.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammar-agent ammar-agent force-pushed the side-questions-2hr3 branch from 599e39b to bc0356c Compare May 17, 2026 20:47
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Rebased onto latest main and squashed the branch to a single commit. Local targeted tests and make static-check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant